Repository navigation
Conversation
…s, add pairing code rendezvous, and sync desktop sessions
…lippy in relay-server
…agent bindings in catalog Co-Authored-By: BaoCode <[email protected]>
…and-session-sync # Conflicts: # src-tauri/src/commands/host_tunnel.rs
…ct requests Connect requests may carry the phone's VibeX account token. The host resolves both the phone's token and its own signed-in owner through the VibeX site and only queues the request when they are the same account; the desktop banner tags verified requests 同账号 for one-time approval. Co-Authored-By: BaoCode <[email protected]>
…account connect Co-Authored-By: BaoCode <[email protected]>
Co-Authored-By: BaoCode <[email protected]>
Co-Authored-By: BaoCode <[email protected]>
Co-Authored-By: BaoCode <[email protected]>
Co-Authored-By: BaoCode <[email protected]>
…vice revocation, and iOS/Android parity
Contributor
Author
|
已整合最新改动并迁移至 #80,关闭本 PR。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
围绕桌面端(VibeX Host)与双端移动伴随端(Xircth/vibex-remote-ios#2、Xircth/vibex-remote-android#4)统一完善远程连接体验、授权生命周期与活跃会话同步:
sequenceDiagram participant Companion as iOS / Android Companion participant Host as VibeX Host Companion->>Host: POST /api/v1/auth/connect-requests (account_token) Host->>Host: verify_same_account + __same_account_auto_connect_v1 (默认开启) Host-->>Companion: status="approved", sas_code="XXXX", DeviceCredential Note over Companion,Host: 双端顶部非阻塞展示 4 位 SAS 连接码 + 桌面端支持一键 [断开] Host->>Host: 退出账号 / 移除设备 -> revoke_account_linked_devices Host-->>Companion: HTTP 401 & WebSocket 250ms 内即时断开下线crates/server/src/ ├── account_link.rs # verify_same_account -> VerifiedSameAccount { identity, auto_approve } ├── auth.rs # 同账号 Companion 即时签发凭证并自动顶替旧手机 + revoke_account_linked_devices 批量吊销同账号设备凭证 └── runtime.rs # create_connect_request 接入同账号自动审批开关 crates/remote-protocol/src/device_auth.rs & crates/db/migrations/ + 20261115010000_connect_request_auto_approval.sql (server_device_connect_requests.issued_device_id) + PendingDeviceConnectRequest { +status, +issued_device_id } src-tauri/src/commands/ ├── web_service.rs # 新增 revoke_account_linked_devices Tauri command └── host_tunnel.rs # 遇终态租约失效/主机撤销时立即清理本地失效租约,停止无效重连循环;隔离配对连接码主题 frontend/src/ ├── components/layout/MobileDeviceConnectBanner.tsx + 5s 非阻塞 4 位 SAS 连接通知卡片 + 一键 [断开] 即时撤销设备凭证 └── features/model-router/account.ts & accountHostConfigs.ts + 退出账号时调用 revoke_account_linked_devices 即刻踢下线已绑定的同账号移动设备(含局域网直连) + 仅在终态鉴权错误时清除远程连接租约(忽略瞬时网络抖动与用户信息加载态),并增加 6 小时后台定时续期 mobile/ios & mobile/android + 同步更新至最新 Companion 提交(同账号零点击 SAS 直连、离网自动回退远程 Reachability、授权撤销即时提示、导航与输入交互优化)主要改动与优化清单
Companion Device凭证并在双端非阻塞展示 4 位连接码;桌面通知带一键「断开」按钮可随时撤销。用户亦可在「设置 → 远程访问」关闭同账号自动连接(__same_account_auto_connect_v1)。revoke_account_linked_devices并在退出账号时自动触发,使同账号配对的移动设备(无论走远程还是局域网 WebSocket)在 250ms 内立即失效下线。20261115010000_connect_request_auto_approval.sql,在DESKTOP_SHELL_COMMANDS注册set_account_relay_lease与revoke_account_linked_devices,并更新shared/hostCommands.ts(shared/types.ts与docs/protocol/v1/校验一致)。Evidence
pending需手动点击同意,换手机易触发单移动设备冲突弹窗。cargo test -p server --lib account_link(4/4通过)与cargo test -p server --lib host_console_pairing_tests(8/8通过,覆盖同账号即时签发顶替及revoke_account_linked_devices)。cargo test -p vibex --lib host_tunnel(8/8通过,覆盖终态拒绝清理逻辑)。pnpm exec vitest run src/components/layout/MobileDeviceConnectBanner.test.tsx src/features/model-router/account.test.ts src/features/model-router/accountHostConfigs.test.ts(10/10通过)。pnpm run generate-types:check、pnpm run remote-protocol-schema:check、cargo clippy -p server --lib -- -D warnings全部通过,且已完成 macOS + iPhone + Android 真机联调验证。Merge Danger
Door: Two-way
数据库迁移仅新增可空列
issued_device_id,协议 DTO 新增字段均带skip_serializing_if = "Option::is_none";同账号自动连接可在远程设置中随时开关,已连接设备可一键撤销。Blast Radius: Low
范围限定在 Host 伴随设备配对/撤销链路、远程连接租约保活与续期、顶部 SAS 连接通知横幅及
mobile/ios、mobile/android子模块更新。